<!DOCTYPE html>
<!-- release v4.1.8, copyright 2014 - 2015 Kartik Visweswaran -->
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Krajee JQuery Plugins - &copy; Kartik</title>
    <link href="__PUBLIC__/home/css/fileinput/bootstrap.min.css" rel="stylesheet">
    <link href="__PUBLIC__/home/css/fileinput/fileinput.css" media="all" rel="stylesheet" type="text/css" />
    <script src="__PUBLIC__/home/js/fileinput/jquery-2.0.3.min.js"></script>
    <script src="__PUBLIC__/home/js/fileinput/fileinput.js" type="text/javascript"></script>
    <script src="__PUBLIC__/home/js/fileinput/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
<div class="container kv-main">

    <br>
    <form enctype="multipart/form-data">
        <div class="form-group">
            <input id="file-1" type="file" multiple class="file" data-show-preview="false" data-overwrite-initial="false">
        </div>
    </form>
</div>
</body>
<script>

    $("#file-1").fileinput({
        uploadUrl: 'add_all_machine.html', // you must set a valid URL here else you will get an error
        allowedFileExtensions : ['xlsx', 'xls'],
        overwriteInitial: false,
        maxFileSize: 1024*1024,
        maxFilesNum: 10,
        //allowedFileTypes: ['image', 'video', 'flash'],
    }).on("fileuploaded", function(event, data) {
            alert('导入完成，成功'+data.success_num+'条');
    });
</script>
</html>